#include "daily_travelling_allowance_type.hpp"
#include "csv_struct.hpp"
#include "file_list.hpp"


bool daily_travelling_allowance_type_csv::exist(int _daily_travelling_allowance_type_id)
{
	csv_struct csv_file(file_list::daily_travelling_allowance_type_filename());

	while(_daily_travelling_allowance_type_id && !csv_file.eof())
	{
		++csv_file;
		daily_travelling_allowance_type_struct_csv row(csv_file.get_line());

		if(row.dailyAllowanceTypeId() == _daily_travelling_allowance_type_id)
				return true;
	}

	return false;
}